package c05面向对象;

public class 继承树中初始化块和构造器的调用顺序2 {
	public static void main(String[] args) {
		System.out.println("main方法里的方法");
		HelloA helloA = new HelloB();
	}
}

class HelloB extends HelloA {
	public HelloB() {
		System.out.println("HelloB");
	}

	{
		System.out.println("I'm B class");
	}

	static {
		System.out.println("static B");
	}
}

class HelloA {
	public HelloA() {
		System.out.println("HelloA");
	}

	{
		System.out.println("I'm A class");
	}

	static {
		System.out.println("static A");
	}
}

